

export const models = {
  name: 'courseGoal',
  model: {
    state: {
      addModal:{
        visible:false,
      },
      editModal: {
        visible: false,
      }
    },
    reducers: {
      setAddModalVisible(state,boolean){
        return{
          ...state,
          addModal:{
            ...state.addModal,
            visible: boolean
          }
        }
      },
      setEditModalVisible(state, boolean) {
        return {
          ...state,
          editModal: {
            ...state.editModal,
            visible: boolean
          }
        }
      }
    },
    effects: dispatch => {
      return{
        addModalVisibleChange(boolean){
          
          dispatch.courseGoal.setAddModalVisible(boolean)
        },
        editModalVisibleChange(boolean) {
          
          dispatch.courseGoal.setEditModalVisible(boolean)
        }
      }
    }
  }
}